package cn.wolfcode.domain;


import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;

@Setter
@Getter
public class Salary {
    private Long id;
    //工资
    private Long money;
    //年份
    private Integer year;
    //月份
    private Integer month;
    //员工
    private Employee employee;
    //发放方式
    private SystemDictionaryItem payout;

    public String getJson(){
        HashMap map = new HashMap();
        map.put("id",id);
        map.put("money",money);
        map.put("year",year);
        map.put("month",month);
        map.put("employeeId",employee.getId());
        map.put("payoutId",payout.getId());

        return JSON.toJSONString(map);
    }

}